/**
 * 分页获取佣金
 * /api/user/exp/commission/page
 * method: GET
 *
 * 获取总佣金金额
 * /api/user/exp/commission/total
 * method: GET
 *
 * 获取代理信息
 * /api/hotel/agent/info
 * method: GET
 *
 * 申请代理
 * /api/hotel/agent/apply
 * method: POST
 */

import { request } from "../utils/request"

export const getCommissionPage = (params = { current: 1, size: 10 }) => {
	return request({
		url: "/api/user/exp/commission/page",
		method: "GET",
		data: params
	})
}

export const getCommissionTotal = () => {
	return request({
		url: "/api/user/exp/commission/total",
		method: "GET",
	})
}

export const getAgentInfo = () => {
	return request({
		url: "/api/hotel/agent/info",
		method: "GET",
	})
}

export const getQrcode = () => {
	return request({
		url: "/api/hotel/agent/qrcode",
		method: "GET",
	})
}

export const applyAgent = (id) => {
	return request({
		url: "/api/hotel/agent/apply?id=" + id,
		method: "POST",
	})
}